
loop_move.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <loop_move>:
#include <string.h>

#define MAX_LEN 20

void loop_move(char *pstr, int steps)
{
   0:	e92d4800 	push	{fp, lr}
   4:	e28db004 	add	fp, sp, #4
   8:	e24dd020 	sub	sp, sp, #32
   c:	e50b0020 	str	r0, [fp, #-32]	; 0xffffffe0
  10:	e50b1024 	str	r1, [fp, #-36]	; 0xffffffdc
	int n = strlen(pstr) - steps;
  14:	e51b0020 	ldr	r0, [fp, #-32]	; 0xffffffe0
  18:	ebfffffe 	bl	0 <strlen>
  1c:	e1a02000 	mov	r2, r0
  20:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
  24:	e0633002 	rsb	r3, r3, r2
  28:	e50b3008 	str	r3, [fp, #-8]
	char tmp[MAX_LEN];
	
	strcpy(tmp, pstr + n);	
  2c:	e51b3008 	ldr	r3, [fp, #-8]
  30:	e51b2020 	ldr	r2, [fp, #-32]	; 0xffffffe0
  34:	e0822003 	add	r2, r2, r3
  38:	e24b301c 	sub	r3, fp, #28
  3c:	e1a01002 	mov	r1, r2
  40:	e1a00003 	mov	r0, r3
  44:	ebfffffe 	bl	0 <strcpy>
	strcpy(tmp + steps, pstr);	
  48:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
  4c:	e24b201c 	sub	r2, fp, #28
  50:	e0823003 	add	r3, r2, r3
  54:	e51b1020 	ldr	r1, [fp, #-32]	; 0xffffffe0
  58:	e1a00003 	mov	r0, r3
  5c:	ebfffffe 	bl	0 <strcpy>
	*(tmp + strlen(pstr)) = '\0';
  60:	e51b0020 	ldr	r0, [fp, #-32]	; 0xffffffe0
  64:	ebfffffe 	bl	0 <strlen>
  68:	e1a02000 	mov	r2, r0
  6c:	e24b301c 	sub	r3, fp, #28
  70:	e0833002 	add	r3, r3, r2
  74:	e3a02000 	mov	r2, #0
  78:	e5c32000 	strb	r2, [r3]
	strcpy(pstr, tmp);
  7c:	e24b301c 	sub	r3, fp, #28
  80:	e1a01003 	mov	r1, r3
  84:	e51b0020 	ldr	r0, [fp, #-32]	; 0xffffffe0
  88:	ebfffffe 	bl	0 <strcpy>
}
  8c:	e24bd004 	sub	sp, fp, #4
  90:	e8bd8800 	pop	{fp, pc}

00000094 <loop_m>:

void loop_m(char *pstr, int steps)
{
  94:	e92d4800 	push	{fp, lr}
  98:	e28db004 	add	fp, sp, #4
  9c:	e24dd020 	sub	sp, sp, #32
  a0:	e50b0020 	str	r0, [fp, #-32]	; 0xffffffe0
  a4:	e50b1024 	str	r1, [fp, #-36]	; 0xffffffdc
	int n = strlen(pstr) - steps;
  a8:	e51b0020 	ldr	r0, [fp, #-32]	; 0xffffffe0
  ac:	ebfffffe 	bl	0 <strlen>
  b0:	e1a02000 	mov	r2, r0
  b4:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
  b8:	e0633002 	rsb	r3, r3, r2
  bc:	e50b3008 	str	r3, [fp, #-8]
	char tmp[MAX_LEN];
	
	memcpy(tmp, pstr + n, steps);
  c0:	e51b3008 	ldr	r3, [fp, #-8]
  c4:	e51b2020 	ldr	r2, [fp, #-32]	; 0xffffffe0
  c8:	e0821003 	add	r1, r2, r3
  cc:	e51b2024 	ldr	r2, [fp, #-36]	; 0xffffffdc
  d0:	e24b301c 	sub	r3, fp, #28
  d4:	e1a00003 	mov	r0, r3
  d8:	ebfffffe 	bl	0 <memcpy>
	
	memcpy(pstr + steps, pstr, n);
  dc:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
  e0:	e51b2020 	ldr	r2, [fp, #-32]	; 0xffffffe0
  e4:	e0823003 	add	r3, r2, r3
  e8:	e51b2008 	ldr	r2, [fp, #-8]
  ec:	e51b1020 	ldr	r1, [fp, #-32]	; 0xffffffe0
  f0:	e1a00003 	mov	r0, r3
  f4:	ebfffffe 	bl	0 <memcpy>
	printf("t %s\n", pstr);
  f8:	e51b1020 	ldr	r1, [fp, #-32]	; 0xffffffe0
  fc:	e59f0028 	ldr	r0, [pc, #40]	; 12c <loop_m+0x98>
 100:	ebfffffe 	bl	0 <printf>
	
	memcpy(pstr, tmp, steps);
 104:	e51b2024 	ldr	r2, [fp, #-36]	; 0xffffffdc
 108:	e24b301c 	sub	r3, fp, #28
 10c:	e1a01003 	mov	r1, r3
 110:	e51b0020 	ldr	r0, [fp, #-32]	; 0xffffffe0
 114:	ebfffffe 	bl	0 <memcpy>
	printf("t %s\n", pstr);
 118:	e51b1020 	ldr	r1, [fp, #-32]	; 0xffffffe0
 11c:	e59f0008 	ldr	r0, [pc, #8]	; 12c <loop_m+0x98>
 120:	ebfffffe 	bl	0 <printf>
}
 124:	e24bd004 	sub	sp, fp, #4
 128:	e8bd8800 	pop	{fp, pc}
 12c:	00000000 	.word	0x00000000

00000130 <main>:

int main()
{
 130:	e92d4800 	push	{fp, lr}
 134:	e28db004 	add	fp, sp, #4
 138:	e24dd010 	sub	sp, sp, #16
	char str[10] = "xiaozhi";
 13c:	e59f203c 	ldr	r2, [pc, #60]	; 180 <main+0x50>
 140:	e24b3014 	sub	r3, fp, #20
 144:	e8920003 	ldm	r2, {r0, r1}
 148:	e8830003 	stm	r3, {r0, r1}
 14c:	e3a03000 	mov	r3, #0
 150:	e14b30bc 	strh	r3, [fp, #-12]
	char *p = str;
 154:	e24b3014 	sub	r3, fp, #20
 158:	e50b3008 	str	r3, [fp, #-8]
	
	loop_move(str, 2);	
 15c:	e24b3014 	sub	r3, fp, #20
 160:	e3a01002 	mov	r1, #2
 164:	e1a00003 	mov	r0, r3
 168:	ebfffffe 	bl	0 <loop_move>
	//loop_m(str, 2);
	printf("%s\n", p);
 16c:	e51b0008 	ldr	r0, [fp, #-8]
 170:	ebfffffe 	bl	0 <puts>
}
 174:	e1a00003 	mov	r0, r3
 178:	e24bd004 	sub	sp, fp, #4
 17c:	e8bd8800 	pop	{fp, pc}
 180:	00000008 	.word	0x00000008
